package com.example.bgxqmanage.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * @author lizijian
 */
@Mapper
public interface UserDao {

  /**
   * 修改头像
   * @param userId
   * @param avatar
   */
  @Update("UPDATE user SET avatar =#{avatar}  WHERE id=#{userId} ")
  void updateAvatar(@Param("userId") int userId,@Param("avatar") String avatar);

  /**
   * 修改用户性别
   * @param sex
   * @param userId
   */
  @Update("UPDATE user SET sex =#{sex} WHERE id= #{userId}")
  void updateSex(@Param("sex") short sex,@Param("userId") int userId);

}
